/**
 * Project Name:gc.sms.mvn
 * File Name:RoleDaoImpl.java
 * Package Name:com.clps.dev.sms.dao.impl
 * Date:2018年11月15日下午10:39:04
 * Copyright (c) 2018, longbiosphere@163.com All Rights Reserved.
 *
 */
package com.clps.dev.sms.dao.sm.impl;





import java.util.List;

import org.springframework.stereotype.Repository;

import com.clps.dev.sms.common.dao.impl.BaseDaoImpl;
import com.clps.dev.sms.dao.sm.RoleDao;
import com.clps.dev.sms.entity.sm.Role;

/**
 * ClassName: RoleDaoImpl <br/>
 * Description: date: 2018年11月15日 下午10:39:04 <br/>
 *
 * @author long.ma
 * @version V1.0
 * @since JDK 1.8
 */



@Repository
public class RoleDaoImpl extends BaseDaoImpl<Role> implements RoleDao {

	String HQL_QUERY_ROLE_NAME = "from Role as role where role.roleName=?";
	
	/**
	 * Creates a new instance of RoleDaoImpl.
	 *
	 * @param clazz
	 */

	public RoleDaoImpl() {
		super(Role.class);
	}

	/**
	 *
	 * @see com.clps.dev.sms.dao.sm.RoleDao#queryByRoleName(java.lang.String)
	 */
	@Override
	public List<Role> queryByRoleName(String roleName) {
		@SuppressWarnings("unchecked")
		List<Role> roles = (List<Role>) this.getHibernateTemplate().find(HQL_QUERY_ROLE_NAME, roleName);
		return roles;
	}

}
